﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication10
{
    public partial class MasterResume : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void ResumeSubmit_Click(object sender, EventArgs e)
        {
            Resume R = new Resume();
            R.ResumeTitle = txtResumeTitle.Text;   
           R.Name = Name.Text;
           R.Address= Address.Text;
           R.Education = Education.Text;
           R.Experience = Experience.Text;
           R.Skills = Skills.Text;
           if (FileUpload1.HasFile)
           {
                FileUpload1.SaveAs(Server.MapPath("~/Images/" + FileUpload1.FileName));
                R.imageName = FileUpload1.FileName.ToString();
                R.imagePath = "~/Images/" + FileUpload1.FileName.ToString();
           }

            int id = Resume.InsertResume(R);
            Response.Redirect("MasterSuccessfulResume.aspx?id=" + id);
            
        }
    }
}